#ifndef COMM_H
#define COMM_H

#include "myhead.h"

extern int tcpsock;
extern pthread_t pid_recv;
extern pthread_attr_t myattr;

extern char new_list_data[2048];
extern char new_msg_data[2048];
extern char new_file_data_head[2048];
extern char new_emoji_data_head[2048];
extern volatile bool list_need_update;
extern volatile bool msg_need_update;
extern volatile bool file_need_update;
extern volatile bool emoji_need_update;

typedef struct LoginInfo
{
    char *username;
    char *password;
}LoginInfo;

void client_init(void);
void get_comm_info(char *rbuf);
void *client_recv(void *arg);

#endif
